﻿<Window x:Class="LogicCircuit.DialogExportImage"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:lc="clr-namespace:LogicCircuit"
	xmlns:properties="clr-namespace:LogicCircuit.Properties"
	WindowStartupLocation="CenterOwner"
	Title="{x:Static properties:Resources.TitleExportImage}"
	Style="{StaticResource DialogFixedWindow}"
	FocusManager.FocusedElement="{Binding ElementName=imageType}"
>
	<lc:AutoGrid>
		<TextBlock Grid.ColumnSpan="2" Margin="8"
			Text="{x:Static properties:Resources.MessageExportImageDialog}"
		/>

		<Label Content="{x:Static properties:Resources.TitleType}"/>
		<lc:AutoWidthComboBox x:Name="imageType"
			ItemsSource="{Binding Path=Encoders}"
			SelectedItem="{Binding Path=Encoder, Mode=TwoWay}"
			SelectionChanged="ImageTypeSelectionChanged"
		/>

		<Label Content="{x:Static properties:Resources.TitleFile}" Target="{Binding ElementName=fileName}"/>
		<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
			<TextBox Name="fileName" MinWidth="420" SpellCheck.IsEnabled="False"
				Text="{Binding Path=FilePath, Mode=TwoWay}"
			/>
			<Button Click="ButtonFileClick" Padding="3,0,3,0" Margin="3,0,8,0" MinWidth="10" HorizontalAlignment="Right" VerticalAlignment="Center"
				Width="{Binding ElementName=fileName, Path=ActualHeight}"
				Height="{Binding ElementName=fileName, Path=ActualHeight}"
				Content="{x:Static properties:Resources.TitleFileOpen}"
			/>
		</StackPanel>

		<StackPanel Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom">
			<Button Content="{x:Static properties:Resources.TitleOK}" IsDefault="True" Click="ButtonOkClick"/>
			<Button Content="{x:Static properties:Resources.TitleCancel}" IsCancel="True"/>
		</StackPanel>
	</lc:AutoGrid>
</Window>
